﻿using Microsoft.AspNetCore.Http;

namespace VisionCloud.Domain.File.Model
{
    public class ChunkUploadModel
    {
        /// <summary>
        /// 文件Md5值
        /// </summary>
        public string Md5 { get; set; }

        /// <summary>
        /// 当前索引
        /// </summary>
        public int Chunk { get; set; }

        /// <summary>
        /// 总块数
        /// </summary>
        public int Chunks { get; set; }

        /// <summary>
        /// 文件名
        /// </summary>
        public string Name { get; set; }

        /// <summary>
        /// 单文件
        /// </summary>
        public IFormFile File { get; set; }
    }

    public class ChunkStatus
    {
        /// <summary>
        /// 是否完成
        /// </summary>
        public bool IsChunked { get; set; } = false;

        /// <summary>
        /// Chunk索引
        /// </summary>
        public int Chunk { get; set; }
    }

    public class MergeModel
    {
        public string Md5 { get; set; }

        /// <summary>
        /// 文件名
        /// </summary>
        public string FileName { get; set; }

        /// <summary>
        /// 文件总字节数
        /// </summary>
        public int FileTotalSize { get; set; }
    }
}